-- THESE SCRIPTS ARE COPYRIGHTED BY MAC HELP COMPANY
-- CONTACT AUTHOR FOR PERMISSION TO USE THESE SCRIPTS
end copyright
on HelpMsg1 String, ThisItem
show card field "Help Message Field"
put "Explanation of" && ThisItem into card field "Help Message Field"
put String into line 3 of card field "Help Message Field"
play harpsichord dx ae d
if ThisItem contains "button" then set hilite of ThisItem to false
end HelpMsg1
on HelpMsg2 String, ThisItem
show background field "Help Message Field"
put "Explanation of" && ThisItem into background field "Help Message Field"
put String into line 3 of background field "Help Message Field"
play harpsichord dx ae d
if ThisItem contains "button" then set hilite of ThisItem to false
end HelpMsg2
on mouseStillDown
if the optionKey is down and the shiftKey is down then
edit script of the name of the target
pass mouseStillDown
end if
end mouseStillDown
on openCard
Global RegMessage, DoMessage, VersionMessage
if DoMessage is not False then
set UserLevel to 2
play boing a
answer VersionMessage & Return & "See where to Register or Continue?" & "                                  " & "This program is copyrighted by Mac Help Company, 1988. All Rights Reserved." with "Continue" or "See"
if it is "See" then
answer RegMessage with "Good Deal"
end if
end if
end OpenCard
on CloseStack
set userlevel to 5
get the freeSize of this stack
if it > 100000 then
put the value of it into NumK
put Round(NumK/1000) into NumK
answer "Because a significant number of transactions have been " & "cleared or deleted, you can reclaim approximately " & NumK & "k of available disk space by compacting this stack." with "Compact"
doMenu "Compact Stack"
end if
end CloseStack
on openstack
Global GivingDate, ShortGivingDate, LastButtonID1, LastButtonID2
Global ThisField, RegMessage, DoMessage, VersionMessage
Global PersonalAddress, BackinAFlash, Transaction, TransName
set cursor to 4
if BackinAFlash is not True then
put True into BackinAFlash
put False into DoMessage
hide message box
hide menubar
put the long date into GivingDate
put the short date into ShortGivingDate
put 0 into ThisField
go to card "RegCard"
get background field "Message"
put line 1 of it into VersionMessage
put VersionMessage & Return & line 2 of it into VersionMessage
put line 4 of it into RegMessage
set lockscreen to true
go to card "a" of background "a"
get card field "Statistics"
put line 1 of it into AcctNum
put line 2 of it into theScroll
put line 3 of it into Transaction
put line 4 of it into TransName
set the scroll of card field "Summary" to theScroll
set lockscreen to true
--show card button "Account Hilighter"
click at the loc of card button "Account Hilighter"
put ShortgivingDate into card field "Card Date2"
send "ResetFields" to background
go to card "RegCard"
set lockscreen to false
visual effect scroll up to black
visual effect scroll up to gray
visual effect dissolve
if VersionMessage contains "Demo" then
put True into DoMessage
put "To receive documentation the" && "latest version, send $40.00 (check or money order)" && "to:" & Return & Return & RegMessage into RegMessage
else
put False into DoMessage
end if
if card field "Check Address" is empty and DoMessage is False then
answer "Please personalize your registered copy of this stack." & " This information will also be used when printing your checks!" with "Cancel" or "OK"
if it is "Cancel" then
show background field "Message"
go to card "Map"
pass "openStack"
end if
hide background field "Message"
set the style of card field "Check Address" to opaque
ask "Name or Business Name?"
put it into line 1 of card field "Check Address"
ask "Street address?"
put it into line 2 of card field "Check Address"
ask "City, State, and Zip?"
put it into line 3 of card field "Check Address"
ask "Phone Number and/or Drivers License?"
put it into line 4 of card field "Check Address"
answer "All information is entered. You can make any corrections " & "by moving the cursor on to the address field. Click 'Accept' when done."
show card button "Accept"
show card button "Don't Accept"
set locktext of card field "Check Address" to false
else
put card field "Check Address" into PersonalAddress
go to card "Map"
end if
end if -- end BackinAFlash
end openstack
on "CreditSubs"
Global BeginCreditField, ExitFlag, ShortGivingDate, TransName
put BeginCreditField+4 into EndField
set numberformat to 0.00
put true into ExitFlag
repeat with i = BeginCreditField to EndField
put card field id i into SubName
put i+5 into SubAmtID
get card field id SubAmtID
put it into Amount
if Amount is not empty then
if SubName is not empty then
if the value of Amount is not 0 then
put False into ExitFlag
put the value of Amount into SubAmt
go to card SubName of background "Sub Accounts"
put 0 into i
put shortGivingDate into ThisDate
convert ThisDate to DateItems
repeat forever
add 1 to i
get line i of background field "Sub Amount"
if it is empty then
put TransName into TempTrans
delete last char of TempTrans
put shortGivingDate & " $ " & SubAmt && TempTrans into line i of background field "Sub Amount"
exit repeat
else
convert word 1 of it to dateItems
put it into Temp
if Temp < ThisDate then
-- keep going
else
put TransName into TempTrans
delete last char of TempTrans
put return before line i of background field "Sub Amount"
put shortGivingDate & " $ " & SubAmt && TempTrans into line i of background field "Sub Amount"
exit repeat
end if
end if
end repeat
add SubAmt to background field "Sub Total"
go to card "a" of background "a"
end if
end if
end if
end repeat
end "CreditSubs"
on "UnCreditSubs"
Global BeginCreditField, ShortGivingDate, TransName
put BeginCreditField+4 into EndField
set numberformat to 0.00
repeat with i = BeginCreditField to EndField
put card field id i into SubName
if SubName is not empty then
put i+5 into SubAmtID
get card field id SubAmtID
if it is not empty then
put the value of it into SubAmt
if SubAmt is not 0 then
go to card SubName of background "Sub Accounts"
put 0 into i
put shortGivingDate into ThisDate
convert ThisDate to DateItems
repeat forever
add 1 to i
get line i of background field "Sub Amount"
if it is empty then
put 0 - SubAmt into SubAmt
put TransName into TempTrans
delete last char of TempTrans
put shortGivingDate & " $ " & SubAmt && TempTrans into line i of background field "Sub Amount"
exit repeat
else
convert word 1 of it to dateItems
put it into Temp
if Temp < ThisDate then
-- keep going
else
put 0 - SubAmt into SubAmt
put TransName into TempTrans
delete last char of TempTrans
put return before line i of background field "Sub Amount"
put shortGivingDate & " $ " & SubAmt && TempTrans into line i of background field "Sub Amount"
exit repeat
end if
end if
end repeat
Add SubAmt to background field "Sub Total"
go to card "a" of background "a"
end if
end if
end if
end repeat
end "UnCreditSubs"
on "CreditSubs2"
Global BeginCreditField, ShortGivingDate, TransName
put BeginCreditField+4 into EndField
put the ID of this card into ThisCardID
set numberformat to 0.00
repeat with i = BeginCreditField to EndField
put background field id i into SubName
if SubName is not empty then
put i+5 into SubAmtID
get background field id SubAmtID
put the value of it into SubAmt
if SubAmt is not 0 then
go to card SubName of background "Sub Accounts"
put 0 into i
put shortGivingDate into ThisDate
convert ThisDate to DateItems
repeat forever
add 1 to i
get line i of background field "Sub Amount"
if it is empty then
put TransName into TempTrans
delete last char of TempTrans
put shortGivingDate & " $ " & SubAmt && TempTrans into line i of background field "Sub Amount"
exit repeat
else
convert word 1 of it to dateItems
put it into Temp
if Temp < ThisDate then
-- keep going
else
put TransName into TempTrans
delete last char of TempTrans
put return before line i of background field "Sub Amount"
put shortGivingDate & " $ " & SubAmt && TempTrans into line i of background field "Sub Amount"
exit repeat
end if
end if
end repeat
add SubAmt to background field "Sub Total"
go to ThisCardID
end if
end if
end repeat
end "CreditSubs2"
on "UnCreditSubs2"
Global BeginCreditField, ShortGivingDate, TransName
put BeginCreditField+4 into EndField
put the ID of this card into ThisCardID
set numberformat to 0.00
repeat with i = BeginCreditField to EndField
put background field id i into SubName
if SubName is not empty then
put i+5 into SubAmtID
get background field id SubAmtID
put the value of it into SubAmt
if SubAmt is not 0 then
go to card SubName of background "Sub Accounts"
put 0 into i
put shortGivingDate into ThisDate
convert ThisDate to DateItems
repeat forever
add 1 to i
get line i of background field "Sub Amount"
if it is empty then
put 0 - SubAmt into SubAmt
put TransName into TempTrans
delete last char of TempTrans
put shortGivingDate & " $ " & SubAmt && TempTrans into line i of background field "Sub Amount"
exit repeat
else
convert word 1 of it to dateItems
put it into Temp
if Temp < ThisDate then
-- keep going
else
put 0 - SubAmt into SubAmt
put TransName into TempTrans
delete last char of TempTrans
put return before line i of background field "Sub Amount"
put shortGivingDate & " $ " & SubAmt && TempTrans into line i of background field "Sub Amount"
exit repeat
end if
end if
end repeat
subtract SubAmt from background field "Sub Total"
go to ThisCardID
end if
end if
end repeat
end "UnCreditSubs2"
on "CheckForExisting"
Global TransName, LastCheckNumber, AcctNum, ShortGivingDate
Global ExitFlag, NewCardName, Transaction
set lockscreen to true
go to card NewCardName of background "a"
if the result is empty then
beep
set numberformat to 0.00
put background field "Credit" into aC
put background field "Debit" into aD
subtract aD from aC
answer "On this date you have already made at least one " & "transaction of type '" & Transaction & "' TO THE SAME ACCOUNT "& "for $ " & AC & " What do you wish to do?" with "Cancel" or "View it" or "Make New"
if it is "view it" then
set lockscreen to false
put True into ExitFlag
exit "CheckForExisting"
else
go to card "a" of background "a"
if it is "Cancel" then
set lockscreen to false
put True into ExitFlag
exit "CheckForExisting"
end if
end if
end if
set lockscreen to false
end "CheckForExisting"
on "DoDate"
Global GivingDate, ShortGivingDate, ExitFlag, DatePhrase
if GivingDate is empty then put the long date into GivingDate
put GivingDate into ShortGivingDate
convert ShortGivingDate to short date
put 0 into temp
repeat until Temp = GivingDate
put GivingDate into Temp
put GivingDate into ShortGivingDate
convert ShortGivingDate to short date
ask DatePhrase & GivingDate & "?" with ShortGivingDate
if it contains "To" then put the short date into it